package com.gitee.wsl.common.ui.input.event

/**
 * Description of the PointerEvent type
 */
 enum class EventType {

    /**
     * The pointer is "pressed down" could be a touch or a mouse down action
     */
    Down,

    /**
     * The pointer is "released" could be a touch release or a mouse up action
     */
    Up,

    /**
     * The pointer is moved
     */
    Move,

    /**
     * The pointer enters the [Viz]
     */
    Enter,

    /**
     * The pointer leaves the [Viz]
     */
    Leave,

    /**
     * A click event is a quick press and release of the same pointer.
     * Note that you'll receive 3 events: Down, [Up + Click] if they are done fast enough.
     */
    Click,

    /**
     * A double click event is a quick double press and release of the same pointer
     * Note that you'll receive 7 events: Down, [Up + Click], Down, [Up + Click + DoubleClick] if they are
     * done fast enough.
     */
    DoubleClick,

    /**
     * A "cancel" event is fired when the device cancel the current operation (for example in case of a tablet
     * rotation or if the device has been disabled during the event...)
     */
    Cancel,

    /**
     * An unknown event is triggered, this should not happen :)
     */
    Unknown;

    internal val toBeRemoved
        get() = this == Cancel || this == Leave || this == Up || this == Unknown
}